<template>
    <div class="pdL20">
        <div class="mgT20">测试页面路由（传统写法）</div>
        <div class="mgT20">count:{{ count }}</div>
        <div class="mgT10">
            <button @click="increment">Increment</button>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            count: 0,
        };
    },
    methods: {
        increment() {
            this.count++;
        },
    },
    beforeCreate() {
        console.log("beforeCreate: 组件实例创建之前");
    },
    created() {
        console.log("created: 组件实例创建完成");
    },
    beforeMount() {
        console.log("beforeMount: 组件挂载之前");
    },
    mounted() {
        console.log("mounted: 组件挂载完成");
    },
    beforeUpdate() {
        console.log("beforeUpdate: 数据更新之前");
    },
    updated() {
        console.log("updated: 数据更新完成");
    },
    beforeUnmount() {
        console.log("beforeUnmount: 组件销毁之前");
    },
    unmounted() {
        console.log("unmounted: 组件销毁完成");
    },
};
</script>
